package com.exption;

import lombok.Data;

@Data
public class Result<T> {
    private int status;
    private String message;
    private T t;
    public Result(int code ,String msg ,T t){
        this.status = code;
        this.message = msg;
        this.t = t;
    }
    public Result(ExceptionEnum exceptionEnum){
        this.status = exceptionEnum.getCode();
        this.message = exceptionEnum.getMsg();
        this.t = null;
    }
    public Result(String msg){
        this.status = 2002;
        this.message = msg;
    }
}
